package sctu.edu.java.year2016.team01.chenhong.day20160522.chapter6_1;

/**
 * Created by Administrator on 2016/5/22.
 * mingrikejijavabu中i的个数
 */
public class Number {
    public static void main(String[] args) {

        String s = "mingrikejijavabu";
        int time = 0;


        for (int j = 0; j < s.length(); j++) {
            if (s.charAt(j) == 'i') {
                time += 1;
            }
        }


        System.out.println("mingrikejijavabu中i的个数：" + time);
    }
}
